<%@page import="com.film.domain.Director"%>
<%@page import="com.film.service.impl.DirectorServiceImpl"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" errorPage="500.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>导演管理</title>
    <link rel="stylesheet" href="../admin_css/director.css">
    <link rel="stylesheet" href="../admin_css/iconfont/iconfont.css">
    <script type="text/javascript" src="../admin_js/jquery.min.js"></script>
   	<script type="text/javascript" src="../admin_js/director.js"></script>
</head>
<body>
<div class="content">
    <div class="container" style="padding: 0px;width: 100% ;">
    <div class="tou"><span class="iconfont icon-zhiyuanguanli"></span><span style="font-weight: bold; margin-left: 6px;">导演信息管理</span></div>
    <table class="table" style="display:block;">
        <caption><span id="sum" style="margin-left: 30px;">共${directorCount.size()}条</span></caption>
        <thead>
	        <tr>
	         	<th>导演编号</th>
	            <th>导演名</th>
	            <th>导演生日</th>
	           	<th>导演性别</th>
	            <th>导演国籍</th>
	            <th>操作</th>
	        </tr>
        </thead>     
        <tbody id="table" >
           <c:if test="${!empty director}">
				<c:forEach items="${director}" var="dir" >
				<tr>                
					<td>${dir.dirId}</td>
	              	<td>${dir.dirName}</td>
	              	<td hidden>${dir.dirNickName}</td>
	                <td hidden>${dir.dirTypr}</td>
	                <td >${dir.dirBirth}</td>
	                <td hidden>${dir.dirHeight}</td>
	               	<td>${dir.dirSex}</td>
			        <td>${dir.dirNationnality}</td>
			        <td hidden>${dir.dirBirthPlace}</td>
			       	<td hidden>${dir.dirStar}</td>
			       	<td hidden>${dir.dirIntroduce}</td>
			       	<td hidden>${dir.dirImg}</td>
              		<td>   
              			<button class=" btn btn-default" onclick="updateDirector(this)"><span>修改</span></button>
                		<button class=" btn btn-default" onclick="directorDefinite(this)"><span>明细</span></button> 
	                </td>
	            </tr>        
				</c:forEach>
				</c:if>
        </tbody>
    </table>
    <!--分页-->
   <div id="fenye" class="panel-footer" style="text-align: center; display: block;">
        <nav style="height: 35px;">
            <ul class="pagination" style="margin-top:0px;">
                <li id="Previous" class="disabled">
                    <a aria-label="Previous">
                        <span aria-hidden="true" onclick="performerPageUp(${firstPage})">«</span>
                    </a>
                </li>
                <c:forEach items="${pagenum}" var = "num">
                <c:if test="${firstPage eq num}">
                <li id="pageSum" class="active data" onclick="pageBtn(this)"><a href="javascript:void(0)">${num}</a></li>
                </c:if>
                <c:if test="${firstPage != num}">
                <li id="pageSum" class="data" onclick="pageBtn(this)"><a href="javascript:void(0)">${num}</a></li>
                </c:if>
                </c:forEach>
                <li id="li">
                    <a aria-label="Next" href="javascript:void(0)">
                        <span aria-hidden="true" onclick="performerPageDown(${firstPage},${pagenum.size()})">»</span>
                    </a>
                </li>
            </ul>
        </nav>
        <div class="clearfix"></div>
    </div>
	<div align="center" style="margin-bottom: 10px;padding-top: 10px; border-top: 1px solid #b3a6a6;">
        <button id="but2" type="button" onclick="addIn()" class="btn btn-success" data-toggle="modal" data-target="#add" style=" width: 100px; height: 40px; line-height: 30px;">
            <span style="margin-right: 6px; color:white; font-size: 16px;">√</span>
            <span style="color:white; font-weight: 800;font-size: 16px;">添加</span>
        </button>
    </div>
	
	</div>
	<!--导演信息修改 -->
<form action="/film/updateDidrector.do" method="post" >
	<div class="modal fade" id="update" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" onclick="updatecloseBtn()" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title" id="myModalLabel" style="text-align: center;">电影信息修改</h4>
                </div>
                <div class="text-center" style="margin-top: 15px; text-align: center;">
                    <div class="form-group" hidden>
                        <label for="firstname" class="col-sm-3 control-label" ></label>
                        <div class="" >
                            <input class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"   name="dirId">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改导演名:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirname">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改导演英文名:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirforeignName">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改导演别名:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirnickName">
                        </div>
                    </div>
                     
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改出生日期:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirbirth">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改身高：</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirheight">
                        </div>
                    </div>
                  
                    
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改性别:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirsex">
                        </div>
                    </div>
                  
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改国籍:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirnationality">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改出生地:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirbirthPlace">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改导演星座:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirstar">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改导演介绍:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dirintroduce">
                        </div>
                    </div>
                  
                </div>
                <div class="modal-footer" style="text-align: center;">
                  <!--   <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> -->
                    <button type="submit" class="btn btn-danger" data-dismiss="modal">修改</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
	</form>
    <!--添加弹出框 -->
    <form action="/film/addDirector.do" method="post" enctype="multipart/form-data" onsubmit="return checkForm()">	
    <div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="btnclose" onclick="addbtnclose()" type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title" id="myModalLabel" style="text-align: center;">导演信息添加</h4>
                </div>
                <div class="text-center" style="margin-top: 15px; text-align: center;">
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演名称</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_name">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演英文名</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_foreignName">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演别名</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_nickName">
                        </div>
                    </div>
                      <div class="form-group">
	                        <label for="firstname" class="col-sm-3 control-label">电影图片</label>
	                        <div class="">
	                            <input type="file" name="filmImg" style="margin-left: 0px; display: inherit;width: 230px;" >
	                        </div>
	                 </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演出生日期</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_birth">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演身高</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" name="dir_height">
                        </div>
                    </div>
                  
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演性别</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" name="dir_sex"	>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演国籍</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_nationality">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演出生地</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_birthPlace">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演星座</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_star">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演介绍</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_introduce">
                        </div>
                    </div>
                    
                </div>
                <div class="modal-footer" style="text-align: center;">
                   <!--  <button id="but5" type="button" class="btn btn-default" data-dismiss="modal">取消</button> -->
                    <button type="submit" class="btn btn-danger" data-dismiss="modal">添加</button>
                </div>
            </div>    
        </div>
    </div>
    </form>
	
	<!--导演明细--> 
	     <div class="modal fade" id="definite" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="btnclose" onclick="definitebtnclose()" type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title" id="myModalLabel" style="text-align: center;">导演信息展示</h4>
                </div>
                <div class="text-center" style="margin-top: 15px; text-align: center;">
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演名称</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_name" readonly>
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演英文名</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_foreignName" readonly>
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演别名</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_nickName" readonly>
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演出生日期</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_birth" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演身高</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" name="dir_height" readonly>
                        </div>
                    </div>
                  
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演性别</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" name="dir_sex" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演国籍</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_nationality" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演出生地</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_birthPlace" readonly>
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演星座</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_star" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">导演介绍</label>
                       
                           <!--  <textarea rows="50" cols="50"  style="margin-left: 0px; display: inherit;width: 245px; height:100px; " name="dir_introduce">
                            
                            
                            </textarea> -->
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;"  name="dir_introduce" readonly>
                      
                    </div>
       			   
                </div>
              
            </div>
           
        </div>
    
    </div>

</div>
</div>
</body>

</html>